function getNow(): number {
  return window.performance && window.performance.now ? (window.performance.now() + window.performance.timing.navigationStart) : +new Date()
}

function isUndef(v: any) {
  return v === undefined || v === null
}

function spliceOne<T>(list: T[], index: number) {
  for (; index + 1 < list.length; index++) {
    list[index] = list[index + 1];
  }
  list.pop();
}

export { getNow, isUndef, spliceOne };
